#! /bin/bash
yum install git wget curl unzip perl moreutils -y
cd /home
mkdir myid
cd myid
wget https://cdn.npm.taobao.org/dist/node/v14.15.4/node-v14.15.4-linux-x64.tar.xz
tar -xvf node-v14.15.4-linux-x64.tar.xz
mv node-v14.15.4-linux-x64 nodejs
ln -s /home/myid/nodejs/bin/npm /usr/local/bin/
ln -s /home/myid/nodejs/bin/node /usr/local/bin/
wget https://gitee.com/azsummer/jd-base/raw/master/jd-unicom/jd3.25.zip
unzip jd3.25.zip
chmod +x jd
cd /home/myid/nodejs/lib/node_modules
wget https://gitee.com/azsummer/jd-base/raw/master/jd-unicom//pm2.zip
unzip pm2.zip
cd /usr/bin
ln -s /home/myid/nodejs/lib/node_modules/pm2/bin/pm2 pm2
cd /home/myid/jd/AutoSignMachine
npm i
pm2 start /home/myid/jd/panel/server.js
pm2 startup
pm2 save
echo "---------- 安装完成 ----------"
echo " 控制面板默认用户名admin"
echo " 控制面板默认密码adminadmin"
echo " 控制面板请访问您的IP:5678"
echo "----------------------------------------"
echo " 使用教程请查看控制面板"
echo
echo " BY:莫老师一键illii.cn"
echo " 2021-2-4更新3.25.1"
echo " 注意请不要退出 10秒后进行首次初始化"
echo "----------------------------------------"
sleep 10s
bash /home/myid/jd/git_pull.sh